package cn.cloud.all.security.authentication.event;

import cn.cloud.all.security.core.Authentication;
import org.springframework.util.Assert;

public class InteractiveAuthenticationSuccessEvent extends AbstractAuthenticationEvent {

    private final Class<?> generatedBy;

    public InteractiveAuthenticationSuccessEvent(Authentication authentication, Class<?> generatedBy) {
        super(authentication);
        Assert.notNull(generatedBy, "generatedBy cannot be null");
        this.generatedBy = generatedBy;
    }

    public Class<?> getGeneratedBy() {
        return generatedBy;
    }
}
